package day1020_3;
public class E1 {
    public static void main(String[] args) throws Exception {
            int a = 0;
            int b = 8 / a;
            System.out.println(b);//ArithmeticException: 数学运算异常

            int[] ars = {10, 60};
            System.out.println(ars[10]);
            //ArrayIndexOutOfBoundsException
    }
}


//try {
//            int a = 0;
//            int b = 8 / a;
//            System.out.println(b);//ArithmeticException: 数学运算异常
//
//            int[] ars = {10, 60};
//            System.out.println(ars[10]);
//            //ArrayIndexOutOfBoundsException
//        }catch(RuntimeException e){
//            System.out.println("代替性的代码");
//        }